<!--加载头部文件-->
{include file="static/view/web/Common/header.html"}
<!--加载导航栏-->
{include file="static/view/web/Common/navbar.html"}
<body>
    <div class="container-fluid" id="elasticsearch-page">
        <input type="hidden" id="noncestr" value="{$noncestr}">

        <div class="row">
            <div class="col-md-6">
                <h4>请输入你的搜索文本:</h4>
            </div>

            <div class="col-md-6">
                <button type="button" class="btn btn-primary btn-sm pull-right" v-on:click="search()">生成热词排行榜</button>
            </div>
        </div>

        <div class="row">
            <div class="col-md-12">
                <div class="com-md-10">
                    <textarea class="form-control" rows="5" v-model="content"></textarea>
                </div>
            </div>
        </div>

        <div class="row" style="margin-top: 20px;">
            <div class="col-md-12">
                <h4>热词排行榜:</h4>

                <ul class="list-group">
                    <li class="list-group-item" v-for="(item, i) in hotPhrase">{{i + 1}}:&nbsp;&nbsp;&nbsp;&nbsp; 词频: {{item.doc_count}} &nbsp;&nbsp;&nbsp;&nbsp; {{item.key}}</li>
                </ul>
            </div>
        </div>

        <div class="row" style="margin-top: 20px">
            <div class="col-md-12">
                <h4>搜索历史:</h4>
                <ul class="list-group">
                    <li class="list-group-item" v-for="(item, i) in dataList">{{i + 1}}:&nbsp;&nbsp;&nbsp;&nbsp; {{item.content}}</li>
                </ul>
            </div>
        </div>
    </div>
</body>
<!--记载尾部-->
{include file="static/view/web/Common/footer.html"}